package rendava;

import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics;

/**
 * Sets render position in accordance with paragraph tags.
 * @author Ben Gomm
 * @version 0.9
 *
 */

public class Paragraph extends SimpleTag {
	
	
	public void renderInfo(Renderer renderer)
	{
		Graphics g = renderer.getGraphics();
		g.setFont(new Font("Courier", 0, 12)); // it would be good to get the actual current font
		FontMetrics fm = g.getFontMetrics();
		int stringHeight = fm.getHeight();
		
		renderer.setX(0);
		renderer.setY(renderer.getY() + stringHeight);

	}
	
	public String closeTag()
	{
		return "</p>";
	}

	

}
